
import Layout from 'views/layout/index.vue'
import Login from 'views/login/login.vue'
// import Payment from 'views/payment/payment.vue'
const routes = [
  {
    path: '/login',
    name: 'login',
    component: Login
  },
  {
    path: '/404',
    name: '404',
    component: () => import('views/error-page/404')
  },
  {
    path: '/',
    name: 'Layout',
    redirect: '/index',
    component: Layout,
    children: [
      {
        path: 'index',
        name: 'index',
        component: () => import('views/home/home')
      },
      {
        path: 'payment',
        name: 'payment',
        component: () => import('views/payment/payment')
      }
    ]
  },
  {
    path: '/order',
    name: 'order',
    redirect: '/order/batteryList',
    component: Layout,
    children: [
      {
        path: 'search',
        name: 'order-searchList',
        component: () => import('views/order/search-list.vue'),
      },
      {
        path: 'authList',
        name: 'order-authList',
        component: () => import('views/order/auth-list.vue'),
      },
      {
        path: 'activeList',
        name: 'order-activeList',
        component: () => import('views/order/active-list.vue'),
      },
      {
        path: 'batteryList',
        name: 'order-batteryList',
        component: () => import('views/order/battery-list.vue'),
      },
      {
        path: 'brokerage',
        name: 'order-brokerage',
        component: () => import('views/order/brokerage.vue'),
      },
      {
        path: 'creditList',
        name: 'order-creditList',
        component: () => import('views/order/credit-list.vue'),
      },
      {
        path: 'loseList',
        name: 'order-loseList',
        component: () => import('views/order/lose-list.vue'),
      },
      {
        path: 'wiredList',
        name: 'order-wiredList',
        component: () => import('views/order/wired-list.vue'),
      }
    ]
  },
  {
    path: '/finance',
    name: 'finance',
    redirect: '/finance/tradeLog',
    component: Layout,
    children: [
      {
        path: 'tradeLog',
        name: 'finance-tradeLog',
        component: () => import('views/finance/recharge.vue'),
      },
      {
        path: 'refundLog',
        name: 'finance-refundLog',
        component: () => import('views/finance/refund.vue'),
      },
      {
        path: 'withdrawalList',
        name: 'finance-withdrawalList',
        component: () => import('views/finance/withdraw.vue'),
      },
      {
        path: 'withdrawalre',
        name: 'finance-withdrawalre',
        component: () => import('views/finance/withdrawalre.vue'),
      },
      {
        path: 'agency',
        name: 'finance-agency',
        component: () => import('views/finance/agency.vue'),
      },
    ]
  },
  {
    path: '/equipment',
    name: 'equipment',
    redirect: '/equipment/index',
    component: Layout,
    children: [
      {
        path: 'index',
        name: 'equipment-index',
        component: () => import('views/device/cabinet.vue'),
      },
      {
        path: 'batteryList',
        name: 'equipment-batteryList',
        component: () => import('views/device/power.vue'),
      },
    ]
  },
  {
    path: '/wired',
    name: 'wired',
    redirect: '/wired/index',
    component: Layout,
    children: [
      {
        path: 'index',
        name: 'wired-index',
        component: () => import('views/device/line.vue'),
      },
    ]
  },
  {
    path: '/admin',
    name: 'admin',
    redirect: '/admin/groupList',
    component: Layout,
    children: [
      {
        path: 'groupList',
        name: 'admin-groupList',
        component: () => import('views/user/system-role.vue'),
      },
      {
        path: 'userList',
        name: 'admin-userList',
        component: () => import('views/user/admin.vue'),
      },
    ]
  },
  {
    path: '/customer',
    name: 'customer',
    redirect: '/customer/index',
    component: Layout,
    children: [
      {
        path: 'index',
        name: 'customer-index',
        component: () => import('views/user/user.vue'),
      },
    ]
  },
  {
    path: '/seller',
    name: 'seller',
    redirect: '/seller/index',
    component: Layout,
    children: [
      {
        path: 'index',
        name: 'seller-index',
        component: () => import('views/user/merchant.vue'),
      },
    ]
  },
  {
    path: '/stat',
    name: 'stat',
    redirect: '/stat/index',
    component: Layout,
    children: [
      {
        path: 'index',
        name: 'stat-index',
        component: () => import('views/setting/statistics.vue'),
      },
    ]
  },
  {
    path: '/faq',
    name: 'faq',
    redirect: '/faq/index',
    component: Layout,
    children: [
      {
        path: 'index',
        name: 'faq-index',
        component: () => import('views/setting/help.vue'),
      },
    ]
  },
  {
    path: '/set',
    name: 'set',
    redirect: '/set/index',
    component: Layout,
    children: [
      {
        path: 'index',
        name: 'set-index',
        component: () => import('views/setting/basic.vue'),
      },
      {
        path: 'app',
        name: 'set-app',
        component: () => import('views/setting/program.vue'),
      },
      {
        path: 'sms',
        name: 'set-sms',
        component: () => import('views/setting/sms.vue'),
      },
      {
        path: 'log',
        name: 'set-log',
        component: () => import('views/setting/log.vue'),
      },
      {
        path: 'official',
        name: 'set-official',
        component: () => import('views/setting/official.vue'),
      },
    ]
  },
  {
    path: '/feedback',
    name: 'feedback',
    redirect: '/feedback/index',
    component: Layout,
    children: [
      {
        path: 'index',
        name: 'feedback-index',
        component: () => import('views/setting/feedback.vue'),
      },
    ]
  },
  {
    path: '/screenadv',
    name: 'screenadv',
    redirect: '/screenadv/materialList',
    component: Layout,
    children: [
      {
        path: 'miniprogram',
        name: 'screenadv-miniprogram',
        component: () => import('views/adver/miniprogram.vue'),
      },

      {
        path: 'materialList',
        name: 'screenadv-materialList',
        component: () => import('views/adver/material.vue'),
      },
      {
        path: 'groupList',
        name: 'screenadv-groupList',
        component: () => import('views/adver/group.vue'),
      },
      {
        path: 'planList',
        name: 'screenadv-planList',
        component: () => import('views/adver/plan.vue'),
      },
      {
        path: 'defaultImg',
        name: 'screenadv-defaultImg',
        component: () => import('views/adver/default-picture.vue'),
      },
      {
        path: 'auditList',
        name: 'screenadv-auditList',
        component: () => import('views/adver/examine.vue'),
      },
    ]
  },
  {
    path: '/agency',
    name: 'agency',
    redirect: '/agency/agencyList',
    component: Layout,
    children: [
      {
        path: 'agencyList',
        name: 'agency-agencyList',
        component: () => import('views/agency/agency-list.vue'),
      },
      {
        path: 'employeeList',
        name: 'agency-employeeList',
        component: () => import('views/agency/salesman-list.vue'),
      },
      {
        path: 'sellerList',
        name: 'agency-sellerList',
        component: () => import('views/agency/manager-list.vue'),
      },
    ]
  },
  {
    path: '/other',
    name: 'other',
    redirect: '/other/download-excel',
    component: Layout,
    children: [
      {
        path: 'download-excel',
        name: 'dd',
        component: () => import('views/other/download-excel.vue'),
      },
      {
        path: 'upload-excel',
        name: 'cc',
        component: () => import('views/other/upload-excel.vue'),
      },
      {
        path: 'download-img',
        name: 'ee',
        component: () => import('views/other/download-img.vue'),
      },
      {
        path: 'gener-qrcode',
        name: 'ff',
        component: () => import('views/other/gener-qrcode.vue'),
      },
    ]
  },
]

export default routes